$(function () {
    var code = location.href.split('?#access_token=').pop().split('&expires_in=')[0];
    if(!code){
        BASE.clearpop('未获取到Code');
        return;
    }
    BASE.getHttp('/device/member/qqLogin',{ accessToken:code },function (res) {
        if(res.ecode ==='MEMBER_NOREGISTER_EXCEPTION'){ /*新的用户*/
            location.href = '/bindOldAccount.html?access_token='+code;
            return;
        }
        if(res.code !== 200 && res.ecode !=='MEMBER_NOREGISTER_EXCEPTION'){
            BASE.clearpop(res.message||'授权登录失败');
            return;
        }
        BASE.LOGIN.loginSuccess(res);
    })
});